intersection of two arrays solution